# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=dbus-python
pkgver=1.2.18
pkgrel=1
pkgdesc="Python bindings for DBUS"
url="https://www.freedesktop.org/wiki/Software/DBusBindings"
arch=(x86_64)
license=('GPL' 'LGPL')
depends=('dbus' 'glib2')
makedepends=('python' 'autoconf-archive' 'python-sphinx_rtd_theme' 'python-sphinx')
source=(https://dbus.freedesktop.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.asc})
sha256sums=('92bdd1e68b45596c833307a5ff4b217ee6929a1502f5341bae28fd120acf7260'
            'SKIP')
validpgpkeys=('DA98F25C0871C49A59EAFF2C4DE8FF2A63C7CC90')
replaces=('python-dbus' 'python-dbus-common')
conflicts=('python-dbus' 'python-dbus-common')
provides=("python-dbus=$pkgver" "python-dbus-common=$pkgver")

prepare() {
  cd $pkgname-$pkgver
  autoreconf -vfi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
